<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改字段级映射信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-field-edit" th:object="${mappingFieldInfo}">
            <input name="fieldId" th:field="*{fieldId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">表映射Id：</label>
                <div class="col-sm-8">
                    <input name="tableId" th:field="*{tableId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">目标字段id：</label>
                <div class="col-sm-8">
                    <input name="targetFieldId" th:field="*{targetFieldId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">目标字段code：</label>
                <div class="col-sm-8">
                    <input name="targetFieldCode" th:field="*{targetFieldCode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">目标字段名称：</label>
                <div class="col-sm-8">
                    <input name="targetFieldName" th:field="*{targetFieldName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">源字段id：</label>
                <div class="col-sm-8">
                    <input name="sourceFieldId" th:field="*{sourceFieldId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">源字段code：</label>
                <div class="col-sm-8">
                    <input name="sourceFieldCode" th:field="*{sourceFieldCode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">源字段名称：</label>
                <div class="col-sm-8">
                    <input name="sourceFieldName" th:field="*{sourceFieldName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">字段值来源分类：</label>
                <div class="col-sm-8">
                    <select name="fieldValueType" class="form-control m-b">
                        <option value="">所有</option>
                    </select>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">迁移方法分类：</label>
                <div class="col-sm-8">
                    <select name="transMethodType" class="form-control m-b">
                        <option value="">所有</option>
                    </select>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">迁移规则id：</label>
                <div class="col-sm-8">
                    <input name="transRuleId" th:field="*{transRuleId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">迁移规则code：</label>
                <div class="col-sm-8">
                    <input name="transRuleCode" th:field="*{transRuleCode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">迁移规则说明：</label>
                <div class="col-sm-8">
                    <textarea name="transRuleDetail" class="form-control">[[*{transRuleDetail}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">处理状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box">
                        <input type="radio" name="parseStatus" value="" required>
                        <label th:for="parseStatus" th:text="未知"></label>
                    </div>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">错误信息：</label>
                <div class="col-sm-8">
                    <textarea name="errorMsg" class="form-control">[[*{errorMsg}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "mapping/field";
        $("#form-field-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-field-edit').serialize());
            }
        }
    </script>
</body>
</html>